from flask import Flask,request,render_template
import login_index
app =Flask(__name__)
@app.route("/",methods=['GET','POST'])
def login():
    #获取前端传入过来的帐号密码信息
    if request.method == "POST":
        user = request.form["user"]
        passwd = request.form["passwd"]
        u=login_index.login(user,passwd)
        if u:
            return "欢迎登录雨点系统"
        else:
            return "用户或密码错误"
    else:
        return render_template("index.html")
if __name__=="__main__":
    app.run(debug=True,port=9999)
